﻿using System.Windows.Controls;
using System.Windows.Input;

namespace ClickToEditTextBlock
{
	public partial class MainPage : UserControl
	{
		public MainPage()
		{
			InitializeComponent();
			this.MouseLeftButtonDown += MainPage_MouseLeftButtonDown;

			Text1 = "First Value";
			Text2 = "Second Value";
			Text3 = "Third Value";
		}

		/// <summary>
		/// Focus an invisible TextBox to remove focus from all other controls
		/// </summary>
		/// <param name="sender"></param>
		/// <param name="e"></param>
		void MainPage_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
		{
			FocusTextBox.Focus();
		}

		public string Text1 { get; set; }
		public string Text2 { get; set; }
		public string Text3 { get; set; }
	}
}
